body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    max-width: 900px;
    width: 100%;
    margin: 20px auto;
    background-color: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

h1 {
    text-align: center;
    color: #333;
    margin-top: 0;
    margin-bottom: 30px;
    font-weight: 600;
    font-size: 28px;
    position: relative;
}

h1:after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(to right, #667eea, #764ba2);
    margin: 10px auto 0;
    border-radius: 2px;
}

h2 {
    color: #444;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 12px;
    margin-top: 30px;
    font-weight: 500;
    font-size: 22px;
}

.controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
    padding: 20px;
    background-color: #f9f9ff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
    font-size: 15px;
}

.form-group select, .form-group input {
    padding: 12px 15px;
    border: 2px solid #e1e5f2;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    background-color: #fff;
}

.form-group select:focus, .form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

button {
    grid-column: 2 / span 2;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 14px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 17px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    letter-spacing: 0.5px;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

button:active {
    transform: translateY(0);
}

.file-upload {
    margin: 25px 0;
    padding: 25px;
    border: 2px dashed #c5c9ff;
    border-radius: 10px;
    text-align: center;
    background-color: #f8f9ff;
    transition: all 0.3s ease;
}

.file-upload:hover {
    border-color: #667eea;
    background-color: #f0f2ff;
}

.file-upload label {
    font-weight: 600;
    color: #555;
    display: block;
    margin-bottom: 10px;
    font-size: 17px;
}

.file-upload input[type="file"] {
    width: 100%;
    padding: 10px;
    cursor: pointer;
}

.results {
    margin-top: 30px;
    padding: 20px;
    border-radius: 10px;
    background-color: #fff;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
}

#freeStudents {
    min-height: 150px;
    border-radius: 8px;
    padding: 20px;
    background-color: #f9fbfd;
    border: 1px solid #eef2f7;
}

#busyStudents {
    min-height: 150px;
    border-radius: 8px;
    padding: 20px;
    background-color: #fff9f9;
    border: 1px solid #f7eef2;
}

.free-student-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.free-student-list li {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.free-student-list li:hover {
    background-color: #f0f5ff;
    border-left: 3px solid #667eea;
    transform: translateX(3px);
}

.busy-student-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.busy-student-list li {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.busy-student-list li:hover {
    background-color: #fff0f0;
    border-left: 3px solid #ea6666;
    transform: translateX(3px);
}

.free-student-list li:last-child,
.busy-student-list li:last-child {
    border-bottom: none;
}

.hidden {
    display: none;
}

.student-count {
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 15px;
    font-size: 18px;
    padding: 10px 15px;
    background-color: #edf2f7;
    border-radius: 8px;
    display: inline-block;
}

#loading {
    text-align: center;
    padding: 20px;
    color: #667eea;
    font-weight: 500;
    font-size: 18px;
}

#loading:before {
    content: "⏳";
    display: block;
    font-size: 30px;
    margin-bottom: 10px;
}